<form action="/backend/project/<?php echo isset($project) ? 'update' : 'insert'; ?>" method="post">
    <input type="hidden" name="id" value="<?php echo isset($project) ? $project->id : 0; ?>"/>
    <div class="form-row">
		<label for="home_display">首页显示</label>
		<?php if (isset($project)): ?>
			<input type="checkbox" value="1" name="home_display"<?php echo $project->home_display == '1' ? ' checked="checked"' : ''; ?>/>
		<?php else: ?>
			<input type="checkbox" value="1" name="home_display" />
		<?php endif; ?>
    </div>

    <div class="form-row">
		<label for="cover">封面图片</label>
		<input type="text" name="cover" value="<?php echo isset($project) ? $project->cover : '0'; ?>"/>
    </div>

    <div class="form-row detai-images">
		<label for="images">项目图片</label>
		<input type="text" name="images" value="<?php echo isset($project) ? $project->images : ''; ?>"/>
    </div>

    <div class="form-row">
		<label for="category">项目分类</label>
		<div>
			<?php foreach ($categories as $category): ?>
				<?php if(isset($pcategories) && in_array($category->id, $pcategories)):?>
				<input type="checkbox" value="<?php echo $category->id; ?>" name="category[]" checked="checked"/>
				<?php else:?>
				<input type="checkbox" value="<?php echo $category->id; ?>" name="category[]"/>
				<?php endif;?>
				<span class="label"><?php echo $category->name_zh; ?></span>
			<?php endforeach; ?>
		</div>
    </div>
	<ul class="tab-button">
		<li><a href="javascript:void(0);">french</a></li>
		<li><a href="javascript:void(0);">中文</a></li>
		<li><a href="javascript:void(0);">english</a></li>
	</ul>

	<div class="tab-content">
		<div class="form-row">
			<label for="name_fr">项目名称（法文）</label>
			<input type="text" name="name_fr" class="text" value="<?php echo isset($project) ? $project->name_fr : ''; ?>"/>
		</div>
		<div class="form-row">
			<label for="summary_fr">项目摘要（法文）</label>
			<textarea name="summary_fr" class="summary"><?php echo isset($project) ? $project->summary_fr : ''; ?></textarea>
		</div>
		<div class="form-row">
			<label for="description_fr">项目描述（法文）</label>
			<textarea name="description_fr"><?php echo isset($project) ? $project->description_fr : ''; ?></textarea>
		</div>
		<div class="form-row">
			<label for="labels_fr">标签（法文）</label>
			<input type="text" name="labels_fr" class="text" value="<?php echo isset($project) ? $project->labels_fr : ''; ?>"/>
			<span class="form-tips">(用于搜索,关键词之间使用英文空格隔开)</span>
		</div>
	</div>
	<div class="tab-content">

		<div class="form-row">
			<label for="name_zh">项目名称（中文）</label>
			<input type="text" name="name_zh" class="text" value="<?php echo isset($project) ? $project->name_zh : ''; ?>"/>
		</div>
		<div class="form-row">
			<label for="summary_zh">项目摘要（中文）</label>
			<textarea name="summary_zh" class="summary"><?php echo isset($project) ? $project->summary_zh : ''; ?></textarea>
		</div>
		<div class="form-row">
			<label for="description_zh">项目描述（中文）</label>
			<textarea name="description_zh"><?php echo isset($project) ? $project->description_zh : ''; ?></textarea>
		</div>
		<div class="form-row">
			<label for="labels_zh">标签（中文）</label>
			<input type="text" name="labels_zh" class="text" value="<?php echo isset($project) ? $project->labels_zh : ''; ?>"/>
			<span class="form-tips">(用于搜索,关键词之间使用英文空格隔开)</span>
		</div>

	</div>
	<div class="tab-content">
		<div class="form-row">
			<label for="name_en">项目名称（英文）</label>
			<input type="text" name="name_en" class="text" value="<?php echo isset($project) ? $project->name_en : ''; ?>"/>
		</div>
		<div class="form-row">
			<label for="summary_en">项目摘要（英文）</label>
			<textarea name="summary_en" class="summary"><?php echo isset($project) ? $project->summary_en : ''; ?></textarea>
		</div>
		<div class="form-row">
			<label for="description_en">项目描述（英文）</label>
			<textarea name="description_en"><?php echo isset($project) ? $project->description_en : ''; ?></textarea>
		</div>
		<div class="form-row">
			<label for="labels_en">标签（英文）</label>
			<input type="text" name="labels_en" class="text" value="<?php echo isset($project) ? $project->labels_en : ''; ?>"/>
			<span class="form-tips">(用于搜索,关键词之间使用英文空格隔开)</span>
		</div>
	</div>

    <div class="form-button">
		<input type="submit" name="submit" class="submit" value="提交"/>
    </div>
</form>